#include <stdio.h>

int check(int x, int y) {
	int check;
	for (y = 2; y <= x; y++) {
		if (x % y == 0) {
			return 1;
		}
		return 0;
	}
}

int main(void) {
	int a, b = 2, c;
	int check(int x, int y);
	printf("请输入一个数字：");
	scanf("%d", &a);
	c = check(a, b);
	printf("%d", c);
	if (a == 1 || a == 2 ) {
		printf("是质数");
	} else if (c) {
		printf("不是质数");
	} else {
		printf("是质数");
	}
}